package com.sdry.product.sorting.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sdry.basic.entity.Container;
import com.sdry.product.sorting.entity.SortFrame;
import com.sdry.product.sorting.mapper.SortingStockMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: info_sdry
 * @description: 上架相当于库存
 * @author: cb
 * @create: 2020-02-27 18:37
 **/
@Transactional(rollbackFor = Exception.class)
@Service
public class SortingStockServiceImpl extends ServiceImpl<SortingStockMapper, SortFrame> implements SortingStockService{

    @Resource
    private SortingStockMapper sortingStockMapper;

    @Override
    public Container queryContainer(Long containerId) {
        return sortingStockMapper.queryContainer(containerId);
    }

    @Override
    public List<SortFrame> querySortingStockDetailPage(SortFrame sortFrame) {
        return sortingStockMapper.querySortingStockDetailPage(sortFrame);
    }

    @Override
    public Long querySortingStockDetailTotal(SortFrame sortFrame) {
        return sortingStockMapper.querySortingStockDetailTotal(sortFrame);
    }

    /**
     * 上架库存分页
     * @param sortFrame 库存实体
     * @return List<SortFrame>
     */
    @Override
    public List<SortFrame> querySortingStockPage(SortFrame sortFrame) {
        return sortingStockMapper.querySortingStockPage(sortFrame);
    }

    /**
     * 上架库存分页
     * @param sortFrame 库存实体
     * @return Long
     */
    @Override
    public Long querySortingStockTotal(SortFrame sortFrame) {
        return sortingStockMapper.querySortingStockTotal(sortFrame);
    }

    /**
     * 出库展示
     * @param sortFrame
     * @return
     */
    @Override
    public List<SortFrame> querySortingStockOutPage(SortFrame sortFrame) {
        return sortingStockMapper.querySortingStockOutPage(sortFrame);
    }

    @Override
    public Long querySortingStockOutTotal(SortFrame sortFrame) {
        return sortingStockMapper.querySortingStockOutTotal(sortFrame);
    }
}
